import java.util.Arrays;
//
public class reverseString {
    public static void main(String[] args) {
        char[] st = {'a','b','c','d'};
        int len = st.length/2;//表示循环次数
        int end = st.length-1;
        int start = 0;
        for (int i=len;i>0;i--){
            char temp = st[start];
            st[start] = st[end];
            st[end] = temp;
            start++;
            end--;
        }
        System.out.println(Arrays.toString(st));
    }
}
